'use strict';

require('dotenv').config();

module.exports = {
    development: {
        dialect: 'mysql',
        host: process.env.DEV_DB_HOST,
        port: process.env.DEV_DB_PORT,
        database: process.env.DEV_DB_DATABASE,
        username: process.env.DEV_DB_USERNAME,
        password: process.env.DEV_DB_PASSWORD,
        dialectOptions: {
            bigNumberStrings: true,
        },
        migrationStorageTableName: 'sequelize_meta',
        seederStorage: 'sequelize', // 种子存储
        seederStorageTableName: 'sequelize_data',
    },
    test: {
        dialect: 'mysql',
        host: process.env.CI_DB_HOST,
        port: process.env.CI_DB_PORT,
        database: process.env.CI_DB_DATABASE,
        username: process.env.CI_DB_USERNAME,
        password: process.env.CI_DB_PASSWORD,
        dialectOptions: {
            bigNumberStrings: true,
        },
        migrationStorageTableName: 'sequelize_meta',
        seederStorage: 'sequelize', // 种子存储
        seederStorageTableName: 'sequelize_data',
    },
    production: {
        dialect: 'mysql',
        host: process.env.PROD_DB_HOST,
        port: process.env.PROD_DB_PORT,
        database: process.env.PROD_DB_DATABASE,
        username: process.env.PROD_DB_USERNAME,
        password: process.env.PROD_DB_PASSWORD,
        dialectOptions: {
            bigNumberStrings: true,
        },
        migrationStorageTableName: 'sequelize_meta',
        seederStorage: 'sequelize', // 种子存储
        seederStorageTableName: 'sequelize_data',
    },
};
